<template>
  <div class="title_go_back">
    <mt-header :title="title">
      <div @click="goBackTo" slot="left">
        <mt-button icon="back"></mt-button>
      </div>
      <div  @click="openSheetModal" slot="right">
        <mt-button icon="more"></mt-button>
      </div>
    </mt-header>
  </div>
</template>

<script>
  import Vue from 'vue';
  import {Header, Button, IndexList, IndexSection, Cell} from 'mint-ui';

  Vue.component(IndexList.name, IndexList);
  Vue.component(IndexSection.name, IndexSection);
  Vue.component(Header.name, Header);
  Vue.component(Button.name, Button);
  Vue.component(Cell.name, Cell);
  export default {
    props:{
      title:{
        type:String
      }
    },
    name: 'TitleGoBack',
    methods:{
      goBackTo(){
        this.$router.go(-1);//返回上一层
      },
      openSheetModal(){
        let that = this;
        this.$store.state.dialog.sheetVisibleShow = true;
      }
    }
  }
</script>

<style scoped>

</style>
